//
//  Movie.m
//  HuateVideo
//
//  Created by Tiger on 12-7-10.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "Movie.h"
@interface UIImage (NSCoding)
- (id)initWithCoder:(NSCoder *)decoder;
- (void)encodeWithCoder:(NSCoder *)encoder;
@end

@implementation UIImage (NSCoding)
- (id)initWithCoder:(NSCoder *)decoder {
	NSData *pngData = [decoder decodeObjectForKey:@"PNGRepresentation"];
	[self autorelease];
	self = [[UIImage alloc] initWithData:pngData];
	return self;
}
- (void)encodeWithCoder:(NSCoder *)encoder {
	[encoder encodeObject:UIImagePNGRepresentation(self) forKey:@"PNGRepresentation"];
}
@end
@implementation Movie
@synthesize statusCode;
@synthesize News_id;
@synthesize OrderNUM;
@synthesize News_title;
@synthesize Type;
@synthesize News_pic;
@synthesize News_keyword;
@synthesize News_host_node_id;
@synthesize File_id;
@synthesize File_alias;
@synthesize Display_order;
@synthesize storePath;
@synthesize File_path;
@synthesize storePath_array;
@synthesize File_path_array;
@synthesize News_author;
@synthesize News_arg1;
@synthesize News_arg2;
@synthesize News_arg3;
@synthesize News_arg4;
@synthesize News_arg5;
@synthesize News_content;
@synthesize News_click_count;
@synthesize News_pub_time;
@synthesize iconImg;
@synthesize CountNum;
@synthesize secondPlayed;
@synthesize movieContentLength;
@synthesize detailType;
- (id)initwithMovie:(Movie*)movie{
    self = [super init];
    if (self) {
        self.detailType=movie.detailType;
        self.statusCode=movie.statusCode;
        self.News_id = movie.News_id ;
        self.OrderNUM =  movie.OrderNUM ;
        self.News_title = movie.News_title ;
        self.Type = movie.Type ;
        self.News_pic = movie.News_pic ;
        self.News_keyword = movie.News_keyword ;
        self.News_host_node_id = movie.News_host_node_id ;
        self.File_id = movie.File_id ;
        self.File_alias = movie.File_alias ;
        self.Display_order = movie.Display_order ;
        self.storePath = movie.storePath ;
        self.File_path = movie.File_path ;
        self.storePath_array = movie.storePath_array ;
        self.File_path_array = movie.File_path_array ;
        self.News_arg1=movie.News_arg1 ;
        self.News_arg2 = movie.News_arg2 ;
        self.News_arg3 = movie.News_arg3 ;
        self.News_arg4 = movie.News_arg4 ;
        self.News_arg5 = movie.News_arg5 ;
        self.News_content = movie.News_content ;
        self.News_click_count =  movie.News_click_count ;
        self.News_pub_time = movie.News_pub_time ;
        self.News_author=movie.News_author ;
        self.iconImg=movie.iconImg ;
        self.CountNum =  movie.CountNum ;
        self.secondPlayed= movie.secondPlayed ;
        self.movieContentLength=movie.movieContentLength ;
    }
    return self;
}
- (id)initWithCoder:(NSCoder *)decoder {
    self = [super init];
    if(self) {
        self.detailType=[decoder decodeIntegerForKey:@"detailType"];
		self.statusCode=[decoder decodeIntForKey:@"statusCode"];
        self.News_id = [decoder decodeObjectForKey:@"News_id"];
        self.OrderNUM = [decoder decodeIntForKey:@"OrderNUM"];
        self.News_title = [decoder decodeObjectForKey:@"News_title"];
        self.Type = [decoder decodeObjectForKey:@"Type"];
        self.News_pic = [decoder decodeObjectForKey:@"News_pic"];
        self.News_keyword = [decoder decodeObjectForKey:@"News_keyword"];
        self.News_host_node_id = [decoder decodeObjectForKey:@"News_host_node_id"];
        self.File_id = [decoder decodeObjectForKey:@"File_id"];
        self.File_alias = [decoder decodeObjectForKey:@"File_alias"];
        self.Display_order = [decoder decodeObjectForKey:@"Display_order"];
        self.storePath = [decoder decodeObjectForKey:@"storePath"];
        self.File_path = [decoder decodeObjectForKey:@"File_path"];
        self.storePath_array = [decoder decodeObjectForKey:@"storePath_array"];
        self.File_path_array = [decoder decodeObjectForKey:@"File_path_array"];
        self.News_arg1=[decoder decodeObjectForKey:@"News_arg1"];
        self.News_arg2 = [decoder decodeObjectForKey:@"News_arg2"];
        self.News_arg3 = [decoder decodeObjectForKey:@"News_arg3"];
        self.News_arg4 = [decoder decodeObjectForKey:@"News_arg4"];
        self.News_arg5 = [decoder decodeObjectForKey:@"News_arg5"];
        self.News_content = [decoder decodeObjectForKey:@"News_content"];
        self.News_click_count = [decoder decodeIntForKey:@"News_click_count"];
        self.News_pub_time = [decoder decodeObjectForKey:@"News_pub_time"];
        self.News_author=[decoder decodeObjectForKey:@"News_author"];
		self.iconImg=[decoder decodeObjectForKey:@"iconImg"];
        self.CountNum = [decoder decodeIntForKey:@"CountNum"];
		self.secondPlayed=[decoder decodeIntForKey:@"secondPlayed"];
		self.movieContentLength=[decoder decodeDoubleForKey:@"movieContentLength"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)encoder {
    [encoder encodeInteger:detailType forKey:@"detailType"];
	[encoder encodeDouble:self.movieContentLength forKey:@"movieContentLength"];
    [encoder encodeObject:self.News_id forKey:@"News_id"];
    [encoder encodeInt:self.OrderNUM forKey:@"OrderNUM"];
    [encoder encodeObject:self.News_title forKey:@"News_title"];
    [encoder encodeObject:self.Type forKey:@"Type"];
    [encoder encodeObject:self.News_pic forKey:@"News_pic"];
    [encoder encodeObject:self.News_author forKey:@"News_author"];
    [encoder encodeObject:self.News_keyword forKey:@"News_keyword"];
    [encoder encodeObject:self.News_host_node_id forKey:@"News_host_node_id"];
    [encoder encodeObject:self.File_id forKey:@"File_id"];
    [encoder encodeObject:self.File_alias forKey:@"File_alias"];
    [encoder encodeObject:self.Display_order forKey:@"Display_order"];
    [encoder encodeObject:self.storePath forKey:@"storePath"];
    [encoder encodeObject:self.File_path forKey:@"File_path"];
    [encoder encodeObject:self.storePath_array forKey:@"storePath_array"];
    [encoder encodeObject:self.File_path_array forKey:@"File_path_array"];
    [encoder encodeObject:self.News_arg1 forKey:@"News_arg1"];
    [encoder encodeObject:self.News_arg2 forKey:@"News_arg2"];
    [encoder encodeObject:self.News_arg3 forKey:@"News_arg3"];
    [encoder encodeObject:self.News_arg4 forKey:@"News_arg4"];
    [encoder encodeObject:self.News_arg5 forKey:@"News_arg5"];
    [encoder encodeObject:self.News_content forKey:@"News_content"];
    [encoder encodeInt:self.News_click_count forKey:@"News_click_count"];
    [encoder encodeObject:self.News_pub_time forKey:@"News_pub_time"];
	[encoder encodeObject:self.iconImg forKey:@"iconImg"];
    [encoder encodeInt:self.CountNum forKey:@"CountNum"];
	[encoder encodeInt:self.secondPlayed forKey:@"secondPlayed"];
	[encoder encodeInt:statusCode forKey:@"statusCode"];
}

-(void)dealloc{
	self.iconImg=nil;
    self.News_pub_time=nil;
    self.News_author=nil;
    self.News_id = nil;
    self.News_title = nil;
    self.Type = nil;
    self.News_pic = nil;
    self.News_keyword = nil;
    self.News_host_node_id = nil;
    self.File_id = nil;
    self.File_alias = nil;
    self.Display_order = nil;
    self.storePath = nil;
    self.File_path = nil;
    self.storePath_array = nil;
    self.File_path_array = nil;
    self.News_arg1=nil;
    self.News_arg2 = nil;
    self.News_arg3 = nil;
    self.News_arg4 = nil;
    self.News_arg5 = nil;
    self.News_content = nil;
    [super dealloc];
}

@end
@implementation Video
@end
@implementation MessageList
@end
@implementation DelePlay
@end
@implementation Music
@end
@implementation Original
@end
@implementation Picture
@end
@implementation MovideoScreen
@end
@implementation DelePlayScreen
@end
@implementation VideoScreen
@end
@implementation MusicScreen
@end
@implementation MessageByScreenType
@end
@implementation DSJAdress
@end